package com.rw.service.impl;

import com.rw.dao.UserDao;
import com.rw.pojo.User;
import com.rw.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.sql.SQLException;

@Service(value = "userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

//    public UserDao getUserDao() {
//        return userDao;
//    }
//
//    public void setUserDao(UserDao userDao) {
//        this.userDao = userDao;
//    }

    @Override
    public User login(String uname, String pwd) throws SQLException {
        //也可以处理其他的复杂逻辑
        User user = userDao.login(uname,pwd);
        return user;
    }
}
